package com.demo.service;

import com.demo.common.base.BaseModel;
import com.demo.common.base.ResultModel;
import com.demo.model.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: UserService
 * @Author: ChenXueLi
 * @Date: 2018-10-02 11:02
 */
public interface UserService {

    /**
     * 添加用户
     * @param user
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel addUser(User user, ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 删除用户
     * @param user
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel deleteUser(User user, ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 更新用户
     * @param user
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel updateUser(User user, ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 根据id查询用户信息
     * @param user
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel getUserById(User user, ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 查询用户列表
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel getUserList(ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 快速修改用户状态
     * @param user
     * @param resultModel
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    ResultModel modifyState(User user, ResultModel resultModel, HttpServletRequest request, HttpServletResponse response) throws Exception;

}
